package com.example.combwyaq.visualinterface.people.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.combwyaq.R;
import com.example.combwyaq.utils.GlideUtils;
import com.example.combwyaq.visualinterface.people.entity.RecommendEntity;

import org.greenrobot.greendao.annotation.NotNull;

public class RecommendAdapter  extends  BaseQuickAdapter<RecommendEntity.Values, BaseViewHolder> {

public RecommendAdapter() {
        super(R.layout.item_video_recommend);
        addChildClickViewIds(R.id.video_recommend_play_img);
        }

@Override
protected void convert(@NotNull BaseViewHolder baseViewHolder, RecommendEntity.Values values) {
        baseViewHolder.setText(R.id.video_recommend_title_tv,values.news_title);
        baseViewHolder.setText(R.id.video_recommend_author_tv,values.news_author);
        baseViewHolder.setText(R.id.video_recommend_time_tv,""+values.news_time);
        ImageView imageView = baseViewHolder.getView(R.id.video_recommend_cover_img);
        GlideUtils.loadMatchImg(values.getMedias().get(0).media_url,imageView);
        }
        }